{%extends "base.html" %}

	{% load utils %}

{% block mainbody %}

          <div class="col-md-12 column">

            <ul class="breadcrumb">

              {% for t in tui %}
                <li>
                  <a href="/?tui_id={{ t.id }}">{{ t }}</a>
                </li>

              {% endfor %}

            </ul>
          </div>

          <div class="col-md-3 column">

            <form class="" role="search">
              <div class="form-group">
                <input type="text" name="search" required="required" class="form-control"/><br>
                <button type="submit" class="btn btn-default">搜索</button>
              </div>
            </form>
          </div>


      <div class="col-md-12 column">

        {% for s in subject_list %}

                 


         <div class="panel panel-default">
            <div class="panel-heading">
           <p> <a  href="{% url 'showArticle'  %}?id={{ s.id }}"  class="label label-default">{{ s.Class }}</a></p>


               <h3 class="panel-title">
								<a href="{% url 'showArticle'  %}?id={{ s.id }}" >{{ s.title }}</a>
							</h3>
            </div>
            <div class="panel-body">
														
         <a href="{% url 'showArticle'  %}?id={{ s.id }}"  class="text-success">	{{ s.excerpt }}</a>

        

						</div>

            <div class="panel-footer">
							

                   <a href="/userinfo/?username={{ s.user }}" class="btn btn-link">
														<i class="glyphicon glyphicon-user"></i>
														作者 ({{ s.user }})
													</a>


                   <a href="#" class="btn btn-link">
														<i class="glyphicon glyphicon-eye-open"></i>
														浏览({{ s.views }})
													</a>


   <a href="{% url 'showArticle'  %}?id={{ s.id }}"  class="btn btn-link">
														<i class="glyphicon glyphicon-comment	"></i>
														评论({% get_com s.id %})
													</a>


   <a href="#" class="btn btn-link">
														<i class=".glyphicon .glyphicon-time"></i>
														发布   {{ s.created_time }}
													</a>

   <a href="#" class="btn btn-link" class="text-success">
   
														<i class=".glyphicon .glyphicon-time" class="text-success"></i>
													</a>


                     
                    
						</div>
         </div>

                     {% endfor %}

                     <ul class="pagination">

     {% if subject_list.has_previous %}
               <li class="enabled">
                  <a href="?page={{ subject_list.previous_page_number }}&{{ pass }}" aria-label="Previous">
                     <span aria-hidden="true">&laquo;</span>
                  </a>
               </li>

            {% endif %}
	
    {% for page_num in subject_list.paginator.page_range %}
               {% if page_num == subject_list.number %}
                  <li class="active">
                     <a href="#">
                        {{ page_num }}
                        <span class="sr-only">(current)</span>
                     </a>
                  </li>
               {% else %}
                  <li>
                     <a href="?page={{ page_num }}&{{ pass }}">{{ page_num }}
                        <span class="sr-only">(current)</span>
                     </a>
                  </li>
               {% endif %}
            {% endfor %}


    {% if subject_list.has_next %}
               <li class="enabled">
                  <a href="?page={{ subject_list.next_page_number }}&{{ pass }}" aria-label="last">
                     <span aria-hidden="true">&raquo;</span>
                  </a>
               </li>
            {% endif %}
</ul>

     
     
    
       


   {% endblock %}